<?php

namespace App\Console\Commands\Cron;

use App\Console\BaseCommand;
use App\Console\Scripts\Counter\TopicCounterCommand;

/**
 * 定时任务 - 话题计数统计
 * Class ArticleCounterCommand
 * @package App\Console\Scripts\Counter
 */
class TopicCronCommand extends BaseCommand
{

    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'cron:topic';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'cron for topic';

    /**
     * 定时话题热度统计 - 真热度  + 假热度
     * @return int
     */
    public function handler()
    {
        // 直接调用话题计数脚本
        $this->call(TopicCounterCommand::class, ['action' => 'all']);
        return 1;
    }

}
